package com.atguigu.springboot.controller;/*
代码的功能：
@author:
@return:
@throws:
@args:    
*/

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Arrays;
import java.util.Map;

@Controller
public class HelloController {
//    @RequestMapping({"/","/login.html"})
//    public String index(){
//        return "index";
//    }
    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
        return "Hello World";
    }
    @RequestMapping("/success")
    public String success(Map<String, Object> map){
        //classpath:/templates/success.html
        map.put("hello", "你好！");
        map.put("users", Arrays.asList("zhangshan", "lisi", "wangwu"));
        return "success";
    }

}
